package com.zuoye.text6;


import java.sql.SQLException;

public class Fun1 {
    public static void main(String[] args) throws SQLException {
        NewsDaoImpl2 newsDao=new NewsDaoImpl2();



        //查
        /*List<News> newsList=newsDao.getNewsList();
        for(News news:newsList){
            System.out.println(news.getId()+"\t"+news.getName()+"\t"+news.getCreateDate());
        }
*/


        //增
        /*News news = new News();
        news.setName("php");
        news.setCreateDate(new Date());
        newsDao.add(news);
*/

        //删
       /* News news = new News();
        news.setId(11);
        newsDao.delete(news);
*/

        //改
        News2 news1 = new News2();
        news1.setName("java");
        news1.setId(12);

        newsDao.update(news1);
    }


}
